home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 23
/
Amiga Format AFCD23 (Feb 1998, Issue 107).iso
/
+look_here_1st!+
/
reader_requests
/
apache
/
stophttpd
< prev
next >
Wrap
Text File
|
1997-12-16
|
451b
|
17 lines
/* stophttpd 1.0 */
opened = OPEN( pidfile, 'T:httpd.pid', 'R' )
IF opened == 1 THEN DO
DO WHILE ~EOF( pidfile )
line = READLN( pidfile )
line = SUBSTR( line, 6 )
pid = STRIP( line, 'T', ']' )
say 'Shutting down httpd server ...'
ADDRESS COMMAND 'Break' '>NIL:' pid 'C'
LEAVE
END
CALL CLOSE( pidfile )
ADDRESS COMMAND 'C:Delete' '>NIL:' 'T:httpd.pid'
END
ELSE DO
SAY 'No process ID for httpd found.'
END